<template>
  <div class="about">
    about
    <!-- <p>{{count}}</p> -->
    <button @click="add">增加</button>
    <button @click="des">减少</button>
    <button @click="getHandle">修改数据</button>
    <ul>
      <!-- <li v-for="(item,index) in ChengPinInfo.ChengPinInfo" :key="index">{{item.content}}</li> -->
    </ul>
  </div>
</template>
<script>
// import {mapState,mapActions} from 'vuex'
import axios from 'axios';
export default {
  name: 'About',
  computed:{
    // ...mapState(['count','ChengPinInfo'])
  },
  methods:{
    // ...mapActions(['asyncDecrement']),
      add(){
        this.$store.dispatch('asyncIncrement',{
          num:10
        })
      },
      des(){
        // this.$store.dispatch('asyncDecrement',5)
        this.asyncDecrement(5)
      },
      getHandle(){
        axios.get("http://iwenwiki.com/api/blueburrypai/getChengPinInfo.php").then(res=>{
                console.log(res.data);
                commit('changeChengPinInfo',res.data)
              
            })
        // this.$store.dispatch('asyncChangeChengPinInfo');
      }
  }
  
}
</script>